<?php

class Room extends AppModel {
    
    // define model name
    var $name = 'Room';
    
    // define model schema
    var $schema = array(
        'id'                => array('type' => 'int'),
        'floor'             => array('type' => 'string'),
        'section'           => array('type' => 'string'),
        'number'            => array('type' => 'string'),
        'name'              => array('type' => 'string'),
        'service_id'        => array('type' => 'string'),
        'details'           => array('type' => 'string'),
        'created'           => array('type' => 'datetime'),
        'deletedOn'         => array('type' => 'datetime')
    );
    
    var $virtualFields = array(
        'name' => 'CONCAT(Room.floor,Room.number,Room.section)'
    );

    // define validation rules
    var $validate = array(
    );
    
//    private function validateRoomType($type = null) {
//        if (!$this->Service->activeRecordExists($type)) {
//            $this->Room->invalidate('service_id',__('Invalid room type',true));
//        } 
//    }
    
    
      
}


?>
